import md5 from "./lib/md5-lib";

export default function (val) {
	if (typeof val == "object") {
		val = JSON.stringify(val);
	} else {
		val += "";
	}
	if (val == "") return val;
	return md5(val);
}